package com.security;

import java.util.List;

public class StaticInnerClass {
	
	private List<DoOne> ones;
	
	public StaticInnerClass(List<DoOne> ones) {
		this.ones = ones;
	}
	
	public void doFilter(DoOneList doOneList) {
		doFilterInternal(doOneList);
	}
	
	private void doFilterInternal(DoOneList doOneList) {
		Inner inner = new Inner(ones);
		inner.doFiler();
	}
	
	
	private static class Inner implements DoOneList{
		private int currentpoint = 0;
		private final List<DoOne> ones;
		
		private Inner(List<DoOne> ones) {
			this.ones = ones;
		}

		@Override
		public void doFiler() {
			currentpoint++;
			if(currentpoint<3) {
				System.out.println("currentpoint="+currentpoint);
				DoOne doOne = ones.get(currentpoint-1);
				doOne.doFilter(this);
			}else {
				return;
			}
		}
		
	}

}
